1 # IDE - Visual Studio Code with Windows 10
3 ![Visual Studio Code](assets/vscode01.png)
5 [Visual Studio Code](https://code.visualstudio.com/) is probably the best free option for all Windows 10 users. It provides almost seamless integration with WSL running Ubuntu, syntax highlighting, building, and hardware debugging.
9 1. Setup build environment using [generic WSL guide](Building%20in%20Windows%2010%20with%20Linux%20Subsystem.md)
10 1. Download and install [Visual Studio Code](https://code.visualstudio.com/)
11 1. From the VS Code Extensions download [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) plugin
13 1. Use `Ctrl + Shift + P` to run option `Remote-WSL: Reopen Folder in WSL`
14 1. Allow firewall and other permissions if requested
15 1. Install plugins in WSL workspace:
16 1. [C/C++ from Microsoft](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) for C/C++ support
17 1. [Bookmarks](https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks) for simpler navigation
18 1. Configure the environment using the following snippets as a base
22 Edit file `./.vscode/c_cpp_properties.json` to setup enabled `defines`
31 "${workspaceRoot}/src/main/**"
34 "limitSymbolsToIncludedHeaders": false,
39 "intelliSenseMode": "msvc-x64",
41 "cppStandard": "c++17",
43 "NAV_FIXED_WING_LANDING",
49 "USE_GYRO_BIQUAD_RC_FIR2",
53 "USE_ASYNC_GYRO_PROCESSING",
55 "USE_GLOBAL_FUNCTIONS",
56 "USE_DYNAMIC_FILTERS",
59 "USE_I2C_IO_EXPANDER",
71 Edit `./.vscode/tasks.json` to enable Building with `Ctrl + Shift + B` keyboard shortcut and from Command Console.
75 // See https://go.microsoft.com/fwlink/?LinkId=733558
76 // for the documentation about the tasks.json format
80 "label": "Install/Update CMAKE",
82 "command": "mkdir -p build && cd build && cmake ..",
86 "cwd": "${workspaceFolder}"
90 "label": "Compile autogenerated docs",
92 "command": "python3 src/utils/update_cli_docs.py",
95 "cwd": "${workspaceFolder}"
98 // Example of building a single target
100 "label": "Build Matek F722-WPX",
102 "command": "make MATEKF722WPX",
104 "problemMatcher": [],
106 "cwd": "${workspaceFolder}/build"
109 // Example of building multiple targets
111 "label": "Build Matek F405-STD & WING",
113 "command": "make MATEKF405 MATEKF405SE",
115 "problemMatcher": [],
117 "cwd": "${workspaceFolder}/build"